package homework.xuluoxi;

/*
 * 作业名称：实体类和接口 - 用户消费信息类
 * 作业功能：实现实体类和接口
 * 学    员：徐罗希
 * 版    本：V1.0
 * 备    注：模块二作业
 */

public class ConsumerInformation {
    // 定义成员变量
    private int talkTime;
    private double netFlow;
    private double expense;

    // 构造方法
    public ConsumerInformation() {}
    public ConsumerInformation(int talkTime, double netFlow, double expense) {
        setTalkTime(talkTime);
        setNetFlow(netFlow);
        setExpense(expense);
    }

    // get、set方法
    public int getTalkTime() {
        return talkTime;
    }
    public void setTalkTime(int talkTime) {
        this.talkTime = talkTime;
    }
    public double getNetFlow() {
        return netFlow;
    }
    public void setNetFlow(double netFlow) {
        this.netFlow = netFlow;
    }
    public double getExpense() {
        return expense;
    }
    public void setExpense(double expense) {
        this.expense = expense;
    }

    // 成员方法
    public void show() {
        System.out.println("您的通话时间剩余：" + getTalkTime() + "分钟，流量剩余：" + getNetFlow() + "G，手机余额：" + getExpense() + "元");
    }
}
